package com.apes.hr.area.repository;

import com.apes.framework.jpa.repository.CustomRepository;
import com.apes.hr.area.model.DeptArea;
import com.apes.hr.area.model.DeptAreaItem;
import com.apes.scm.masterdata.frame.model.Dept;
import org.springframework.data.jpa.repository.Query;

import java.util.List;


/**
 * @Title: DeptAreaItemRepository
 * @Description:
 * @author: ZhengZeXian
 * @create: 2021/8/19 10:48
 */
public interface DeptAreaItemRepository extends CustomRepository<DeptAreaItem, String> {

    DeptAreaItem findByDept(Dept dept);

    @Query("SELECT T FROM DeptAreaItem T WHERE T.deptArea.id in :deptAreaIds ")
    List<DeptAreaItem> findByDeptAreaIn(List<String> deptAreaIds);
}
